package com.epsilon.pos.principal.ventas.view;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Button;

import com.epsilon.commons.util.SWTResourceManager;
import com.epsilon.pos.productos.view.ProductoDescripcionComposite;
import org.eclipse.swt.widgets.Control;

public class VentasPrincipalComposite extends Composite {

	private Table							tblVentas;
	private Text							txtSubTotal;
	private Text							txtTotal;
	private Text							txtCodigo;
	private Button							btnAgregarArticulo;
	private Button							btnBusqueda;
	private Button							btnCancelarArticulo;
	private Button							btnCancelarVenta;
	private Button							btnConcretarVenta;

	private ProductoDescripcionComposite	productoDescripcionComposite;
	private TableColumn tblclmnNewColumn;
	private Button btnCantidad;
	private Text txtImpuestos;
	private Text txtTicket;
	private Button btnImprimirTicket;
	private Label lblUltimoTicket;
	private Group grpVenta;
	private Label lblNewLabel_1;
	private Button btnCorteDeCaja;
	private Button btnCortesia;
	private Label lblMontoEnCaja;
	private Button btn2;
	private Button btn3;
	private Button btn4;
	private Button btn5;
	private Button btn6;
	private Button btn7;
	private Button btn8;
	private Button btn9;
	private Button btn10;
	private Button btn11;
	private Button btn12;
	private Button btn13;
	private Button btn14;
	private Button btn1;

	public VentasPrincipalComposite( Composite parent, int style ) {
		super( parent, style );

		Group group = new Group( this, SWT.NONE );
		group.setText( "VENTAS" );
		group.setBounds( 0, 0, 665, 480 );

		tblVentas = new Table( group, SWT.BORDER | SWT.FULL_SELECTION );
		tblVentas.setFont(SWTResourceManager.getFont("Tahoma", 9, SWT.BOLD));
		tblVentas.setLinesVisible( true );
		tblVentas.setHeaderVisible( true );
		tblVentas.setBounds( 10, 45, 649, 328 );

		TableColumn tableColumn = new TableColumn( tblVentas, SWT.NONE );
		tableColumn.setWidth( 100 );
		tableColumn.setText( "Cantidad" );

		TableColumn tableColumn_1 = new TableColumn( tblVentas, SWT.NONE );
		tableColumn_1.setWidth( 319 );
		tableColumn_1.setText( "Descripci\u00F3n" );
		
		tblclmnNewColumn = new TableColumn(tblVentas, SWT.NONE);
		tblclmnNewColumn.setWidth(126);
		tblclmnNewColumn.setText("Marca");

		TableColumn tableColumn_2 = new TableColumn( tblVentas, SWT.NONE );
		tableColumn_2.setWidth( 100 );
		tableColumn_2.setText( "Precio" );

		txtSubTotal = new Text( group, SWT.BORDER );
		txtSubTotal.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		txtSubTotal.setEditable(false);
		txtSubTotal.setFont(SWTResourceManager.getFont("Tahoma", 9, SWT.BOLD));
		txtSubTotal.setBounds( 559, 379, 100, 19 );

		Label label = new Label( group, SWT.RIGHT );
		label.setText( "Subtotal:" );
		label.setBounds( 509, 385, 44, 13 );

		txtTotal = new Text( group, SWT.BORDER );
		txtTotal.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		txtTotal.setEditable(false);
		txtTotal.setFont(SWTResourceManager.getFont("Tahoma", 9, SWT.BOLD));
		txtTotal.setBounds( 559, 429, 100, 19 );

		Label label_1 = new Label( group, SWT.RIGHT );
		label_1.setText( "Total:" );
		label_1.setBounds( 504, 435, 49, 13 );

		txtCodigo = new Text( group, SWT.BORDER );
		txtCodigo.setBounds( 10, 20, 270, 19 );

		btnAgregarArticulo = new Button( group, SWT.NONE );
		btnAgregarArticulo.setText( "Agregar art\u00EDculo" );
		btnAgregarArticulo.setBounds( 286, 16, 120, 23 );

		btnBusqueda = new Button( group, SWT.NONE );
		btnBusqueda.setText( "B\u00FAsqueda" );
		btnBusqueda.setBounds( 413, 16, 120, 23 );

		btnConcretarVenta = new Button( group, SWT.NONE );
		btnConcretarVenta.setEnabled(false);
		btnConcretarVenta.setText( "Concretar venta" );
		btnConcretarVenta.setBounds( 539, 454, 120, 23 );

		btnCancelarVenta = new Button( group, SWT.NONE );
		btnCancelarVenta.setEnabled(false);
		btnCancelarVenta.setText( "Cancelar esta venta" );
		btnCancelarVenta.setBounds( 10, 454, 120, 23 );

		btnCancelarArticulo = new Button( group, SWT.NONE );
		btnCancelarArticulo.setEnabled(false);
		btnCancelarArticulo.setText( "Cancelar art\u00EDculo" );
		btnCancelarArticulo.setBounds( 539, 16, 120, 23 );
		
		btnCantidad = new Button(group, SWT.NONE);
		btnCantidad.setEnabled(false);
		btnCantidad.setBounds(10, 379, 120, 23);
		btnCantidad.setText("Cantidad");
		
		txtImpuestos = new Text(group, SWT.BORDER);
		txtImpuestos.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
		txtImpuestos.setEditable(false);
		txtImpuestos.setFont(SWTResourceManager.getFont("Tahoma", 9, SWT.BOLD));
		txtImpuestos.setBounds(559, 404, 100, 19);
		
		Label lblNewLabel = new Label(group, SWT.RIGHT);
		lblNewLabel.setBounds(492, 410, 61, 13);
		lblNewLabel.setText("Impuestos:");
		
		btnCortesia = new Button(group, SWT.NONE);
		btnCortesia.setEnabled(false);
		btnCortesia.setBounds(137, 454, 120, 23);
		btnCortesia.setText("Cortes\u00EDa");
		group.setTabList(new Control[]{txtCodigo, btnAgregarArticulo, btnBusqueda, btnCancelarArticulo, tblVentas, btnCantidad, txtSubTotal, txtTotal, btnCancelarVenta, btnConcretarVenta});

		productoDescripcionComposite = new ProductoDescripcionComposite( this, SWT.NONE );
		productoDescripcionComposite.setBounds( 671, 0, 314, 209 );
		
		grpVenta = new Group(this, SWT.NONE);
		grpVenta.setText("VENTA");
		grpVenta.setBounds(671, 215, 314, 265);
		
		lblUltimoTicket = new Label(grpVenta, SWT.NONE);
		lblUltimoTicket.setFont(SWTResourceManager.getFont("Tahoma", 16, SWT.NORMAL));
		lblUltimoTicket.setBounds(10, 20, 294, 25);
		
		lblNewLabel_1 = new Label(grpVenta, SWT.NONE);
		lblNewLabel_1.setBounds(10, 51, 294, 13);
		lblNewLabel_1.setText("Impresi\u00F3n de tickets por ID");
		
		txtTicket = new Text(grpVenta, SWT.BORDER);
		txtTicket.setBounds(10, 74, 120, 19);
		
		btnImprimirTicket = new Button(grpVenta, SWT.NONE);
		btnImprimirTicket.setBounds(136, 70, 120, 23);
		btnImprimirTicket.setEnabled(false);
		btnImprimirTicket.setText("Imprimir ticket");
		
		btnCorteDeCaja = new Button(grpVenta, SWT.NONE);
		btnCorteDeCaja.setBounds(136, 213, 120, 23);
		btnCorteDeCaja.setText("Corte de caja");
		
		lblMontoEnCaja = new Label(grpVenta, SWT.NONE);
		lblMontoEnCaja.setBounds(10, 242, 294, 13);
		
		btn1 = new Button(this, SWT.NONE);
		btn1.setBounds(0, 486, 68, 68);
		
		btn2 = new Button(this, SWT.NONE);
		btn2.setBounds(0, 560, 68, 68);
		
		btn3 = new Button(this, SWT.NONE);
		btn3.setBounds(74, 486, 68, 68);
		
		btn4 = new Button(this, SWT.NONE);
		btn4.setBounds(74, 560, 68, 68);
		
		btn5 = new Button(this, SWT.NONE);
		btn5.setBounds(148, 486, 68, 68);
		
		btn6 = new Button(this, SWT.NONE);
		btn6.setBounds(148, 560, 68, 68);
		
		btn7 = new Button(this, SWT.NONE);
		btn7.setBounds(222, 486, 68, 68);
		
		btn8 = new Button(this, SWT.NONE);
		btn8.setBounds(222, 560, 68, 68);
		
		btn10 = new Button(this, SWT.NONE);
		btn10.setBounds(296, 560, 68, 68);
		
		btn9 = new Button(this, SWT.NONE);
		btn9.setBounds(296, 486, 68, 68);
		
		btn12 = new Button(this, SWT.NONE);
		btn12.setBounds(370, 560, 68, 68);
		
		btn11 = new Button(this, SWT.NONE);
		btn11.setBounds(370, 486, 68, 68);
		
		btn14 = new Button(this, SWT.NONE);
		btn14.setBounds(444, 560, 68, 68);
		
		btn13 = new Button(this, SWT.NONE);
		btn13.setBounds(444, 486, 68, 68);
	}

	@Override
	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}

	public ProductoDescripcionComposite getProductoDescripcionComposite() {
		return productoDescripcionComposite;
	}

	public Table getTblVentas() {
		return tblVentas;
	}

	public Text getTxtSubTotal() {
		return txtSubTotal;
	}

	public Button getBtnAgregarArticulo() {
		return btnAgregarArticulo;
	}

	public Button getBtnBusqueda() {
		return btnBusqueda;
	}

	public Button getBtnCancelarArticulo() {
		return btnCancelarArticulo;
	}

	public Button getBtnConcretarVenta() {
		return btnConcretarVenta;
	}

	public Button getBtnCancelarVenta() {
		return btnCancelarVenta;
	}

	public Text getTxtCodigo() {
		return txtCodigo;
	}
	public Button getBtnCantidad() {
		return btnCantidad;
	}
	public Text getTxtTotal() {
		return txtTotal;
	}
	public Text getTxtImpuestos() {
		return txtImpuestos;
	}
	public Button getBtnImprimirTicket() {
		return btnImprimirTicket;
	}
	public Text getTxtTicket() {
		return txtTicket;
	}
	public Label getLblUltimoTicket() {
		return lblUltimoTicket;
	}
	public Label getLblMontoEnCaja() {
		return lblMontoEnCaja;
	}
	public Button getBtnCortesia() {
		return btnCortesia;
	}
	public Button getBtnCorteDeCaja() {
		return btnCorteDeCaja;
	}
	public Button getBtn1() {
		return btn1;
	}
	public Button getBtn2() {
		return btn2;
	}
	public Button getBtn3() {
		return btn3;
	}
	public Button getBtn4() {
		return btn4;
	}
	public Button getBtn5() {
		return btn5;
	}
	public Button getBtn6() {
		return btn6;
	}
	public Button getBtn7() {
		return btn7;
	}
	public Button getBtn8() {
		return btn8;
	}
	public Button getBtn9() {
		return btn9;
	}
	public Button getBtn10() {
		return btn10;
	}
	public Button getBtn11() {
		return btn11;
	}
	public Button getBtn12() {
		return btn12;
	}
	public Button getBtn13() {
		return btn13;
	}
	public Button getBtn14() {
		return btn14;
	}
}